export type DictItem = {
  value: string | boolean | number;
  label: string;
  tagType?: 'primary' | 'success' | 'info' | 'warning' | 'danger' | unknown | '';
  desc?: string;
}

export const specialFlagOptions: DictItem[] = [
  {value: 0x01, label: '实名', tagType: 'primary'},
  // {value: 0x02, label: '奖励', tagType: ''},
  {value: 0x04, label: '有效', tagType: 'success'},
];

export const goodsMarkFlagOptions: DictItem[] = [
  {value: 0x01, label: '金榜推荐', tagType: 'primary'},
  {value: 0x02, label: '今日精选', tagType: 'warning'},
];

export const dayOfWeeksOptions: DictItem[] = [
  {value: 2, label: '星期一'},
  {value: 3, label: '星期二'},
  {value: 4, label: '星期三'},
  {value: 5, label: '星期四'},
  {value: 6, label: '星期五'},
  {value: 7, label: '星期六'},
  {value: 1, label: '星期天'},
];

export const dictTypeMap: Record<string, DictItem[]> = {
  // 系统开关
  'sys_status': [
    {value: 1, label: '正常', tagType: 'success'},
    {value: 0, label: '停用', tagType: 'danger'},
  ],
  // 系统是否
  'sys_yes_no': [
    {value: 1, label: '是', tagType: 'success'},
    {value: 0, label: '否', tagType: 'danger'},
  ],
  'sys_hidden': [
    {value: 0, label: '显示', tagType: 'success'},
    {value: 1, label: '隐藏', tagType: 'danger'},
  ],
  'sys_success': [
    {value: 0, label: '失败', tagType: 'danger'},
    {value: 1, label: '成功', tagType: 'success'},
  ],
  'sys_open': [
    {value: 1, label: '开启', tagType: 'success'},
    {value: 0, label: '关闭', tagType: 'danger'},
  ],
  'sys_deleted': [
    {value: 0, label: '未删除', tagType: 'primary'},
    {value: 1, label: '已删除', tagType: 'danger'},
  ],
  // 操作类型
  'sys_operation_type': [
    {value: 0, label: '其它', tagType: 'info'},
    {value: 1, label: '新增', tagType: 'primary'},
    {value: 2, label: '修改', tagType: 'success'},
    {value: 3, label: '删除', tagType: 'danger'},
    {value: 4, label: '授权', tagType: 'warning'},
  ],
  'sys_operation_status': [
    {value: 0, label: '成功', tagType: 'success'},
    {value: 1, label: '失败', tagType: 'danger'},
  ],
  'sys_user_sex': [
    {value: 'man', label: '男', tagType: 'primary'},
    {value: 'girl', label: '女', tagType: 'danger'},
  ],
  'sys_menu_type': [
    {value: 0, label: '目录', tagType: 'primary'},
    {value: 1, label: '菜单', tagType: 'success'},
    {value: 2, label: '按钮', tagType: 'info'},
  ],
  // 用户登录状态
  'user_login_status': [
    {value: -1, label: '已注销', tagType: 'danger'},
    {value: 0, label: '已禁用', tagType: 'warning'},
    {value: 1, label: '正常', tagType: 'success'},
  ],
  // 实名认证状态
  'user_certify_status': [
    {value: 0, label: '待认证', tagType: 'primary'},
    {value: 1, label: '已认证', tagType: 'success'},
    {value: 2, label: '未通过', tagType: 'warning'},
    {value: 3, label: '待支付', tagType: 'danger'},
  ],
  // 用户级别
  'user_level': [
    {value: 0, label: '达人', tagType: 'info'},
    {value: 1, label: '经理', tagType: 'primary'},
    {value: 2, label: '创客', tagType: 'warning'},
    {value: 3, label: '合伙人', tagType: 'danger'},
  ],
  // 会员等级
  'vip_level': [
    {value: 1, label: 'V1', tagType: 'info'},
    {value: 2, label: 'V2', tagType: 'success'},
    {value: 3, label: 'V3', tagType: 'primary'},
    {value: 4, label: 'V4', tagType: 'warning'},
    {value: 5, label: 'V5', tagType: 'danger'},
  ],
  // 私域等级
  'private_level': [
    {value: 0, label: '普通', tagType: 'info'},
    {value: 1, label: '达人', tagType: 'success'},
    {value: 2, label: 'V1', tagType: 'primary'},
    {value: 3, label: 'V2', tagType: 'warning'},
    {value: 4, label: 'V3', tagType: 'danger'},
  ],
  // 资金类型
  'money_capital_type': [
    {value: 1, label: '花朵', tagType: 'info'},
    {value: 2, label: '贡献值', tagType: 'info'},
    {value: 10, label: '余额', tagType: 'primary'},
    {value: 11, label: '线上补贴', tagType: 'warning'},
    {value: 12, label: '线下补贴', tagType: 'warning'},
    {value: 13, label: '创客奖励', tagType: 'success'},
    {value: 14, label: '合伙人奖励', tagType: 'success'},
    {value: 15, label: '额外奖励', tagType: 'success'},
    {value: 16, label: '消费金', tagType: 'danger'},
    {value: 30, label: '商家花朵', tagType: 'info'},
  ],
  // 资金收益类型
  'money_income_type': [
    {value: 0, label: '支出', tagType: 'danger'},
    {value: 1, label: '收益', tagType: 'success'},
  ],
  // 验证码场景
  'captcha_scene': [
    {value: -1, label: '系统', tagType: 'primary'},
    {value: 0, label: '用户登录', tagType: 'primary'},
    {value: 1, label: '用户注册', tagType: 'success'},
    {value: 2, label: '重置登录密码', tagType: 'info'},
    {value: 3, label: '修改登录密码', tagType: 'warning'},
    {value: 4, label: '重置支付密码', tagType: 'danger'},
    {value: 10, label: '三方授权绑定', tagType: 'primary'},
    {value: 30, label: '账户注销', tagType: 'danger'},
    {value: 100, label: '商家登录', tagType: 'danger'},
    {value: 101, label: '商家重置密码', tagType: 'danger'},
  ],

  // 设备绑定状态
  'device_bind_status': [
    {value: 0, label: '未解绑', tagType: 'primary'},
    {value: 1, label: '已解绑', tagType: 'info'},
  ],
  'device_config_type': [
    {value: 0, label: '设备', tagType: 'info'},
    {value: 1, label: '账号', tagType: 'primary'},
  ],

  // 店铺类型
  'shop_type': [
    {value: 10, label: '线上店铺', tagType: 'primary'},
    {value: 20, label: '线下店铺', tagType: 'danger'},
  ],

  // 店铺状态
  'shop_status': [
    {value: 0, label: '草稿', tagType: 'info'},
    {value: 10, label: '待审核', tagType: 'primary'},
    {value: 20, label: '审核失败', tagType: 'danger'},
    {value: 30, label: '待签约', tagType: 'info'},
    {value: 31, label: '签约中', tagType: 'primary'},
    {value: 32, label: '签约失败', tagType: 'danger'},
    {value: 33, label: '签约成功', tagType: 'success'},
    {value: 100, label: '正常', tagType: 'success'},
    {value: 110, label: '已禁用', tagType: 'danger'},
  ],
  // 分类图片状态
  'goods_category_image_status': [
    {value: 0, label: '草稿', tagType: 'info'},
    {value: 1, label: '已启用', tagType: 'success'},
    {value: 2, label: '已禁用', tagType: 'warning'},
    {value: 3, label: '已删除', tagType: 'danger'},
  ],
  'goods_model_status': [
    {value: 0, label: '下架', tagType: 'info'},
    {value: 1, label: '上架', tagType: 'success'},
  ],
  // 商品类型
  'shop_goods_type': [
    {value: 1, label: '普通商品', tagType: 'primary'},
    {value: 2, label: '私域商品', tagType: 'warning'},
    {value: 3, label: '收银设备', tagType: 'success'},
    {value: 4, label: '花朵专区', tagType: 'danger'},
  ],
  // 商品状态
  'shop_goods_status': [
    {value: 0, label: '草稿', tagType: 'info'},
    {value: 10, label: '待审核', tagType: 'primary'},
    {value: 50, label: '审核失败', tagType: 'danger'},
    {value: 90, label: '待上架', tagType: 'primary'},
    {value: 100, label: '已上架', tagType: 'success'},
    {value: 110, label: '已下架', tagType: 'info'},
    {value: 120, label: '已删除', tagType: 'danger'},
  ],

  // 订单状态
  'shop_order_status': [
    {value: 10, label: '待付款', tagType: 'info'},
    {value: 20, label: '发货中', tagType: 'primary'},
    {value: 30, label: '待收货', tagType: 'primary'},
    {value: 100, label: '已完成', tagType: 'success'},
    {value: 110, label: '已取消', tagType: 'warning'},
    {value: 120, label: '付款失败', tagType: 'warning'},
    {value: 200, label: '已退款', tagType: 'danger'},
  ],
  // 订单支付状态
  'shop_order_payment_status': [
    {value: 0, label: '未支付', tagType: 'info'},
    {value: 1, label: '支付中', tagType: 'info'},
    {value: 2, label: '已支付', tagType: 'success'},
    {value: 3, label: '已退款', tagType: 'danger'},
  ],
  // 订单支付方式
  'shop_order_payment_type': [
    {value: 1, label: '支付宝', tagType: 'primary'},
    {value: 2, label: '微信', tagType: 'success'},
    {value: 3, label: '汇付宝', tagType: 'warning'},
    {value: 10, label: '余额', tagType: 'info'},
  ],
  // 订单售后状态
  'shop_order_after_sales_status': [
    {value: 10, label: '待处理', tagType: 'info'},
    {value: 20, label: '售后中', tagType: 'primary'},
    {value: 100, label: '已退款', tagType: 'success'},
    {value: 110, label: '已拒绝', tagType: 'warning'},
    {value: 120, label: '退款失败', tagType: 'danger'},
  ],
  // 订单售后退款类型 售后类型 0:仅退款 1:退货退款 2:换货
  'shop_order_refund_type': [
    {value: 0, label: '仅退款', tagType: 'primary'},
    {value: 1, label: '退货退款', tagType: 'success'},
  ],

  // 线下产品状态
  'store_product_status': [
    {value: 0, label: '草稿', tagType: 'info'},
    {value: 10, label: '待审核', tagType: 'primary'},
    {value: 50, label: '审核失败', tagType: 'danger'},
    {value: 90, label: '待上架', tagType: 'primary'},
    {value: 100, label: '已上架', tagType: 'success'},
    {value: 110, label: '已下架', tagType: 'info'},
    {value: 120, label: '已删除', tagType: 'danger'},
  ],
  // 线下订单交易类型
  'store_order_source_type': [
    {value: 1, label: '线上买单', tagType: 'success'},
    {value: 2, label: '线下扫码', tagType: 'primary'},
  ],
  // 线下订单交易状态
  'store_order_trade_status': [
    {value: 0, label: '订单生成', tagType: 'info'},
    {value: 1, label: '未支付', tagType: 'warning'},
    {value: 2, label: '支付成功', tagType: 'success'},
  ],

  // 公排类型
  'public_queue_type': [
    {value: 0, label: '全国', tagType: 'success'},
    {value: 1, label: '省排', tagType: 'primary'},
    {value: 2, label: '市排', tagType: 'warning'},
    {value: 3, label: '区排', tagType: 'info'},
    {value: 10, label: '联盟', tagType: 'danger'},
  ],

  // 邀请配置类型
  'invite_config_type': [
    {value: 0, label: '邀请码', tagType: 'primary'},
    {value: 1, label: '排线码', tagType: 'success'},
  ],
  // 特殊配置Key
  'special_config_key': [
    {value: 'home_main_banner', label: '首页轮播图', tagType: 'primary'},
    {value: 'home_main_navigation', label: '首页导航栏', tagType: 'primary'},
    {value: 'home_main_shortcut', label: '首页快捷入口', tagType: 'success'},
    {value: 'home_main_hdzq_picture', label: '首页活动专区', tagType: 'success'},
    {value: 'banner_jptj', label: '轮播图 - 金榜推荐', tagType: 'primary'},
    {value: 'banner_jrsx', label: '轮播图 - 今日上新', tagType: 'primary'},
    {value: 'banner_jxhd', label: '轮播图 - 精选好店', tagType: 'primary'},
    {value: 'banner_hdzq', label: '轮播图 - 活动专区', tagType: 'primary'},
    {value: 'banner_voice_device', label: '轮播图 - 播报设备', tagType: 'primary'},
    {value: 'banner_syzq', label: '轮播图 - 私域专区', tagType: 'primary'},
    {value: 'banner_jfzq', label: '轮播图 - 花朵专区', tagType: 'primary'},
    {value: 'store_banner', label: '轮播图 - 本地商户', tagType: 'success'},
  ],
  // 特殊配置类型
  'special_config_jump_type': [
    {value: 0, label: '无跳转', tagType: 'info'},
    {value: 1, label: '图片链接', tagType: 'primary'},
    {value: 2, label: '网页地址', tagType: 'warning'},
    {value: 3, label: '视频链接', tagType: 'warning'},
    {value: 4, label: '内部页面', tagType: 'success'},
  ],
  // 特殊配置内部跳转页
  'special_config_internal_jump': [
    {value: 'home_main_tjzq', label: '首页推荐', tagType: 'primary'},
    {value: 'goods_list_type', label: '商品类型', tagType: 'success'},
    {value: 'goods_list_mcate', label: '主分类商品', tagType: 'success'},
    {value: 'goods_detail', label: '商品详情', tagType: 'success'},
    {value: 'invite_friend', label: '邀请好友', tagType: 'info'},
  ],
  // 特殊规则配置类型
  'special_rule_config_type': [
    {value: 0, label: '文字描述', tagType: 'primary'},
    {value: 1, label: '图片信息', tagType: 'success'},
  ],

  // 消息类型
  'message_notice_type': [
    {value: 0, label: '系统通知', tagType: 'primary'},
  ],

  // 代理级别
  'agent_level': [
    {value: 0, label: '无', tagType: 'info'},
    {value: 1, label: '省级代理', tagType: 'primary'},
    {value: 2, label: '市级代理', tagType: 'warning'},
    {value: 3, label: '区县代理', tagType: 'danger'},
  ],
  // 代理状态
  'agent_status': [
    {value: 10, label: '待审批', tagType: 'info'},
    {value: 20, label: '已拒绝', tagType: 'warning'},
    {value: 100, label: '已通过', tagType: 'primary'},
    {value: 110, label: '已禁用', tagType: 'danger'},
    //{value: 120, label: '已到期', tagType: 'warning'},
  ],
  // 合伙人赠送状态
  'partner_give_away_status': [
    {value: 0, label: '待审批', tagType: 'info'},
    {value: 1, label: '已通过', tagType: 'primary'},
    {value: 2, label: '已驳回', tagType: 'warning'},
  ],

  // 资金类型
  'capital_type': [
    {value: 0, label: '余额', tagType: 'success'},
    {value: 1, label: '排队补贴', tagType: 'warning'},
    {value: 2, label: '合伙人奖励', tagType: 'danger'},
    {value: 3, label: '贡献值奖励', tagType: 'primary'},
  ],
  // 提现类型
  'withdraw_type': [
    {value: 0, label: '余额提现', tagType: 'success'},
    {value: 1, label: '排队补贴提现', tagType: 'warning'},
    {value: 2, label: '合伙人奖励提现', tagType: 'danger'},
    {value: 3, label: '贡献值奖励提现', tagType: 'primary'},
  ],
  // 提现状态
  'withdraw_status': [
    {value: 10, label: '待审核', tagType: 'info'},
    {value: 20, label: '打款中', tagType: 'primary'},
    {value: 100, label: '提现成功', tagType: 'success'},
    {value: 110, label: '提现驳回', tagType: 'danger'},
    {value: 120, label: '打款失败', tagType: 'warning'},
  ],
  // 提现账户类型
  'withdraw_account_type': [
    {value: 1, label: '银行卡', tagType: 'primary'},
    {value: 2, label: '支付宝', tagType: 'success'},
  ],
  // 时间范围类型
  'time_range_type': [
    {value: 0, label: '天', tagType: 'primary'},
    {value: 1, label: '周', tagType: 'warning'},
    {value: 2, label: '月', tagType: 'danger'},
  ],

  // 分润类型
  'profit_share_type': [
    {value: 0, label: '消费者', tagType: 'info'},
    {value: 10, label: '直推奖励', tagType: 'primary'},
    {value: 50, label: '级别奖励', tagType: 'success'},
    {value: 60, label: '代理奖励', tagType: 'warning'},
    {value: 70, label: '大区奖励', tagType: 'danger'},
    {value: 80, label: '私域奖励', tagType: 'danger'},
    {value: 100, label: '店铺奖励', tagType: 'info'},
    {value: 2000, label: '平台沉淀', tagType: 'danger'},
  ],
  // 分润记录状态
  'profit_share_status': [
    {value: 10, label: '待入账', tagType: 'info'},
    {value: 20, label: '已入账', tagType: 'success'},
  ],
  // 分润来源类型
  'profit_share_from_type': [
    // {value: 2, label: '线下补贴 - 提现', tagType: 'primary'},
    {value: 10, label: '商城订单', tagType: 'success'},
    {value: 11, label: '商城订单 - 推广奖励', tagType: 'success'},
    {value: 12, label: '商城订单 - 联盟服务费', tagType: 'primary'},
    {value: 13, label: '商城订单 - 手续费', tagType: 'danger'},
    {value: 15, label: '商城订单 - 私域分润', tagType: 'info'},
    {value: 20, label: '线下订单', tagType: 'success'},
    {value: 21, label: '线下订单 - 推广奖励', tagType: 'success'},
    {value: 22, label: '线下订单 - 联盟服务费', tagType: 'primary'},
    {value: 23, label: '线下订单 - 手续费', tagType: 'danger'},
  ],

  // 排队补贴状态
  'queue_subsidy_type': [
    {value: 10, label: '线上补贴', tagType: 'success'},
    {value: 20, label: '线下补贴', tagType: 'primary'},
  ],
  // 排队补贴状态
  'queue_subsidy_status': [
    {value: 0, label: '补贴中', tagType: 'primary'},
    {value: 1, label: '已完成', tagType: 'success'},
    {value: 2, label: '已作废', tagType: 'danger'},
  ],
  // 补贴奖励类型
  'queue_subsidy_income_type': [
    {value: 1, label: '消费者', tagType: 'success'},
    {value: 10, label: '⻔店第一', tagType: 'primary'},
    {value: 11, label: '门店加权', tagType: 'warning'},
    {value: 20, label: '公排第一', tagType: 'danger'},
    {value: 21, label: '公排加权', tagType: 'warning'},
    {value: 30, label: '拆红包', tagType: 'danger'},
  ],
  // 补贴配置类型
  'subsidy_config_type': [
    {value: 10, label: '线上', tagType: 'success'},
    {value: 20, label: '线下', tagType: 'primary'},
  ],
  // 补贴配置模式
  'subsidy_config_mode': [
    {value: 1, label: '1.0', tagType: 'info'},
    {value: 2, label: '2.0', tagType: 'primary'},
  ],

  // 支付相关
  // 支付交易状态
  'payment_order_trade_status': [
    {value: 0, label: '订单生成', tagType: 'info'},
    {value: 1, label: '未支付', tagType: 'warning'},
    {value: 2, label: '支付成功', tagType: 'success'},
    {value: 3, label: '交易关闭', tagType: 'danger'},
  ],
  // 支付交易退款状态
  'payment_order_refund_status': [
    {value: 0, label: '正常状态', tagType: 'primary'},
    {value: 1, label: '部分退款', tagType: 'warning'},
    {value: 2, label: '退款完成', tagType: 'danger'},
  ],
  // 支付交易 业务类型
  'payment_order_business_type': [
    {value: 1, label: '商城订单', tagType: 'primary'},
    {value: 11, label: '级别购买', tagType: 'warning'},
    {value: 12, label: '软件复购', tagType: 'warning'},
    {value: 20, label: '线下订单', tagType: 'danger'},
  ],
  // 支付回调状态
  'payment_order_callback': [
    {value: 0, label: '未处理', tagType: 'info'},
    {value: 1, label: '已完成', tagType: 'success'},
  ],

  // 消费券状态
  'coupon_status': [
    {value: 0, label: '未开启', tagType: 'info'},
    {value: 1, label: '正常', tagType: 'success'},
  ],
  'coupon_valid_type': [
    {value: 0, label: '无限制', tagType: 'primary'},
    {value: 1, label: '时间段', tagType: 'success'},
    {value: 2, label: '天数', tagType: 'warning'},
  ],
  // 用户消费券状态
  'coupon_user_status': [
    {value: 0, label: '待使用', tagType: 'info'},
    {value: 1, label: '使用中', tagType: 'primary'},
    {value: 2, label: '已使用', tagType: 'success'},
    {value: 3, label: '已过期', tagType: 'danger'},
  ],

  // 红包状态
  'subsidy_packet_status': [
    {value: 0, label: '待领取', tagType: 'info'},
    {value: 1, label: '领取中', tagType: 'primary'},
    {value: 2, label: '已完成', tagType: 'success'},
    {value: 3, label: '已过期', tagType: 'danger'},
  ],
  // 红包类型
  'subsidy_packet_type': [
    {value: 0, label: '用户红包', tagType: 'primary'},
    {value: 1, label: '商家红包', tagType: 'warning'},
  ],

  // 结算状态 10:待审核 20:结算中 100:已结算 110:已驳回
  'merchant_settlement_status': [
    {value: 10, label: '待审核', tagType: 'info'},
    {value: 20, label: '结算中', tagType: 'primary'},
    {value: 100, label: '已结算', tagType: 'success'},
    {value: 110, label: '已驳回', tagType: 'danger'},
  ],
  // 结算账户类型
  'settlement_account_type': [
    {value: 1, label: '对私法人', tagType: 'info'},
    {value: 2, label: '对私非法人', tagType: 'primary'},
    {value: 3, label: '对公账户', tagType: 'danger'},
  ],

  //商务状态
  'manager_status':[
    {value:0,label:'禁用', tagType: 'danger'},
    {value:1,label:'启用',tagType: 'success'},
  ],
  'audit_status':[
    {value:0,label:'失败', tagType: 'danger'},
    {value:1,label:'成功', tagType: 'success'},
  ],
  'incoming_status':[
    {value:0,label:'拒绝', tagType: 'danger'},
    {value:1,label:'通过', tagType: 'success'},
  ],
  'order_status':[
    {value:0,label:'未支付', tagType: 'warning'},
    {value:1,label:'已支付', tagType: 'success'},
    {value:2,label:'已回调', tagType: 'success'},
    {value:3,label:'已确认', tagType: 'success'},
    {value:4,label:'已结算', tagType: 'success'},
  ],
  'entry_status':[
    {value:true,label:'是', tagType: 'success'},
    {value:false,label:'否', tagType: 'danger'}
  ],
  'sign_status':[
    {value:1,label:'已签约', tagType: 'success'},
    {value:0,label:'未签约', tagType: 'danger'}
  ],
  'book_status':[
    {value:1,label:'已开通', tagType: 'success'},
    {value:0,label:'未开通', tagType: 'danger'}
  ],
}

